package com.bruce.pattern.structural.decorator.v3;


import org.junit.Test;

/**
 * Created by bruce on 2018/11/3 22:55
 */
public class MainTest {

    @Test
    public void test1() {
        AbsBattercake battercake = new Battercake();
        battercake = new EggDecorator(battercake);
        battercake = new EggDecorator(battercake);
        battercake = new SausageDecorator(battercake);

        System.out.println(battercake.getDesc() + " 价格:" + battercake.cost());
    }


}
